package commondata;



public class NbaPlayer implements IPlayer{

	private int playerID;
	
	private int jerseyNo;

	private String playerName;
	
	private String playerSurname;

	private String pos;

	private int age;

	private String height;

	private int weight;
	
	private String college;
	
	private double wage;
	
	private int gamesPlyd;
	
	private int minutesPlyd;

	private int fieldGoals;
	
	private int fieldGoalAttemps;
	
	private double fieldGoalsPer;
	
	private int freeThrows;
	
	private int freeThrowAttemps;
	
	private double freeThrowsPer;
	
	private int threePoints;
	
	private int threePointAttemps;
	
	private double threePointsPer;
	
	private int offRebounds;
	
	private int totalRebounds;
	
	private int assists;
	
	private int steals;
	
	private int turnovers;
	
	private int blocks;
	
	private int fouls;
	
	private int points;
	
	private double pointPG;

	private double assistPG;

	private double reboundPG;

	private double blockPG;

	private double stealPG;

	private double minutesPG;

	private String image;
	
	private boolean BYC;
	
	private int yearsPro;

	private int remainingYear;

	
	public NbaPlayer(int playerID){
		super();
		this.playerID = playerID;
	}

	
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getPlayerID()
	 */
	public int getPlayerID() {
		return playerID;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setPlayerID(int)
	 */
	public void setPlayerID(int playerID) {
		this.playerID = playerID;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getJerseyNo()
	 */
	public int getJerseyNo() {
		return jerseyNo;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setJerseyNo(int)
	 */
	public void setJerseyNo(int jerseyNo) {
		this.jerseyNo = jerseyNo;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getPlayerName()
	 */
	public String getPlayerName() {
		return playerName;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setPlayerName(java.lang.String)
	 */
	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getAge()
	 */
	public int getAge() {
		return age;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setAge(int)
	 */
	public void setAge(int age) {
		this.age = age;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getHeight()
	 */
	public String getHeight() {
		return height;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setHeight(java.lang.String)
	 */
	public void setHeight(String height) {
		this.height = height;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getWeight()
	 */
	public int getWeight() {
		return weight;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setWeight(int)
	 */
	public void setWeight(int weight) {
		this.weight = weight;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getCollege()
	 */
	public String getCollege() {
		return college;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setCollege(java.lang.String)
	 */
	public void setCollege(String college) {
		this.college = college;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getWage()
	 */
	public double getWage() {
		return wage;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setWage(double)
	 */
	public void setWage(double wage) {
		this.wage = formatDouble(wage / 1000000);
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getGamesPlyd()
	 */
	public int getGamesPlyd() {
		return gamesPlyd;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setGamesPlyd(int)
	 */
	public void setGamesPlyd(int gamesPlyd) {
		this.gamesPlyd = gamesPlyd;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getMinutesPlyd()
	 */
	public int getMinutesPlyd() {
		return minutesPlyd;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setMinutesPlyd(int)
	 */
	public void setMinutesPlyd(int minutesPlyd) {
		this.minutesPlyd = minutesPlyd;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFieldGoals()
	 */
	public int getFieldGoals() {
		return fieldGoals;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFieldGoals(int)
	 */
	public void setFieldGoals(int fieldGoals) {
		this.fieldGoals = fieldGoals;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFieldGoalAttemps()
	 */
	public int getFieldGoalAttemps() {
		return fieldGoalAttemps;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFieldGoalAttemps(int)
	 */
	public void setFieldGoalAttemps(int fieldGoalAttemps) {
		this.fieldGoalAttemps = fieldGoalAttemps;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFieldGoalsPer()
	 */
	public double getFieldGoalsPer() {
		return fieldGoalsPer;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFieldGoalsPer(int)
	 */
	public void setFieldGoalsPer(double fieldGoalsPer) {
		this.fieldGoalsPer = formatDouble(fieldGoalsPer);
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFreeThrows()
	 */
	public int getFreeThrows() {
		return freeThrows;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFreeThrows(int)
	 */
	public void setFreeThrows(int freeThrows) {
		this.freeThrows = freeThrows;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFreeThrowAttemps()
	 */
	public int getFreeThrowAttemps() {
		return freeThrowAttemps;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFreeThrowAttemps(int)
	 */
	public void setFreeThrowAttemps(int freeThrowAttemps) {
		this.freeThrowAttemps = freeThrowAttemps;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFreeThrowsPer()
	 */
	public double getFreeThrowsPer() {
		return freeThrowsPer;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFreeThrowsPer(int)
	 */
	public void setFreeThrowsPer(double freeThrowsPer) {
		this.freeThrowsPer = formatDouble(freeThrowsPer);
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getThreePoints()
	 */
	public int getThreePoints() {
		return threePoints;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setThreePoints(int)
	 */
	public void setThreePoints(int threePoints) {
		this.threePoints = threePoints;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getThreePointAttemps()
	 */
	public int getThreePointAttemps() {
		return threePointAttemps;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setThreePointAttemps(int)
	 */
	public void setThreePointAttemps(int threePointAttemps) {
		this.threePointAttemps = threePointAttemps;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getThreePointsPer()
	 */
	public double getThreePointsPer() {
		return threePointsPer;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setThreePointsPer(int)
	 */
	public void setThreePointsPer() {
		if (threePointAttemps == 0)
			this.threePointsPer = 0;
		else {
			double d = (double)threePoints / threePointAttemps;
			this.threePointsPer = formatDouble(d);
		}
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getOffRebounds()
	 */
	public int getOffRebounds() {
		return offRebounds;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setOffRebounds(int)
	 */
	public void setOffRebounds(int offRebounds) {
		this.offRebounds = offRebounds;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getTotalRebounds()
	 */
	public int getTotalRebounds() {
		return totalRebounds;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setTotalRebounds(int)
	 */
	public void setTotalRebounds(int totalRebounds) {
		this.totalRebounds = totalRebounds;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getAssists()
	 */
	public int getAssists() {
		return assists;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setAssists(int)
	 */
	public void setAssists(int assists) {
		this.assists = assists;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getSteals()
	 */
	public int getSteals() {
		return steals;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setSteals(int)
	 */
	public void setSteals(int steals) {
		this.steals = steals;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getTurnovers()
	 */
	public int getTurnovers() {
		return turnovers;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setTurnovers(int)
	 */
	public void setTurnovers(int turnovers) {
		this.turnovers = turnovers;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getBlocks()
	 */
	public int getBlocks() {
		return blocks;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setBlocks(int)
	 */
	public void setBlocks(int blocks) {
		this.blocks = blocks;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getFouls()
	 */
	public int getFouls() {
		return fouls;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setFouls(int)
	 */
	public void setFouls(int fouls) {
		this.fouls = fouls;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getPoints()
	 */
	public int getPoints() {
		return points;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setPoints(int)
	 */
	public void setPoints(int points) {
		this.points = points;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getPointPG()
	 */
	public double getPointPG() {
		return pointPG;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setPointPG(double)
	 */
	public void setPointPG(double pointPG) {
		this.pointPG = formatDouble(pointPG);
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getAssistPG()
	 */
	public double getAssistPG() {
		return assistPG;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setAssistPG(double)
	 */
	public void setAssistPG() {
		if (gamesPlyd == 0)
			this.assistPG = 0;
		else {
			double d = (double)assists / gamesPlyd;
			this.assistPG = formatDouble(d);
		}
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getReboundPG()
	 */
	public double getReboundPG() {
		return reboundPG;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setReboundPG(double)
	 */
	public void setReboundPG() {
		if (gamesPlyd == 0)
			this.reboundPG = 0;
		else {
			double d = (double)totalRebounds / gamesPlyd;
			this.reboundPG =formatDouble(d);
		}
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getBlockPG()
	 */
	public double getBlockPG() {
		return blockPG;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setBlockPG(double)
	 */
	public void setBlockPG() {
		if (gamesPlyd == 0)
			this.blockPG = 0;
		else {
			double d = (double)blocks / gamesPlyd;
			this.blockPG = formatDouble(d);
		}
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getStealPG()
	 */
	public double getStealPG() {
		return stealPG;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setStealPG(double)
	 */
	public void setStealPG() {
		if (gamesPlyd == 0)
			this.stealPG = 0;
		else {
			double d = (double)steals / gamesPlyd;
			this.stealPG = formatDouble(d);
		}
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getMinutesPG()
	 */
	public double getMinutesPG() {
		return minutesPG;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setMinutesPG(double)
	 */
	public void setMinutesPG() {
		if (gamesPlyd == 0)
			this.minutesPG = 0;
		else {
			double d = (double)minutesPlyd / gamesPlyd;
			this.minutesPG = formatDouble(d);
		}
	}
	double formatDouble(double d){
		int in = (int) (d * 1000);
		return ((double)in / 1000);
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getYearsPro()
	 */
	public int getYearsPro() {
		return yearsPro;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setYearsPro(int)
	 */
	public void setYearsPro(int yearsPro) {
		this.yearsPro = yearsPro;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#getRemainingYear()
	 */
	public int getRemainingYear() {
		return remainingYear;
	}

	/* (non-Javadoc)
	 * @see commondata.IPlayer1#setRemainingYear(int)
	 */
	public void setRemainingYear(int remainingYear) {
		this.remainingYear = remainingYear;
	}

	public String getPlayerSurname() {
		return playerSurname;
	}

	public void setPlayerSurname(String playerSurname) {
		this.playerSurname = playerSurname;
	}


	public boolean isBYC() {
		return BYC;
	}

	public void setBYC(boolean byc) {
		BYC = byc;
	}


	public String getPos() {
		return pos;
	}


	public void setPos(String pos) {
		this.pos = pos;
	}

}
